package paging

const DefaultApiPageSize = 10
const DefaultPageSize = 15

type PageInfo struct {
	PageSize    int
	PageCount   int
	CurPage     int
	TotalRecord int
}

func GetPageInfo(cur int, total int, size int) PageInfo {
	var info PageInfo
	info.CurPage = cur + 1
	info.PageCount = total/size + 1
	info.PageSize = size
	info.TotalRecord = total
	return info
}
